<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <style type="text/css">
        #a{
            width: 400px;
            height: 200px;
            background-image: url("6.jpg");
            background-repeat: no-repeat;
        }
        #b{
            width: 400px;
            height: 200px;
            background-size: cover;
            background-image: url("6.jpg");
            background-repeat: no-repeat;
        }
        #c{
            width: 400px;
            height: 200px;
            background-size: contain;
            background-image: url("6.jpg");
            background-repeat: no-repeat;
        }
    </style>
</head>
<body>
    <p>像素</p>
    <div id="a">
    </div>
    <p>cover</p>
    <div id="b">
    </div>
    <p>contain</p>
    <div id="c">
    </div>
</body>
</html>